﻿using AVCUMPlatform.DAL.Interface;
using AVCUMPlatform.Entities;
using AVCUMPlatform.HelperLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AVCUMPlatform.DAL.Implement
{
    internal class SystemInfoDAL : BasDAL<SystemInfo>, ISystemInfoDAL
    {
        public List<SystemInfo> GetAll()
        {
            string sql = SQLHelper.BuildSelectSQL<SystemInfo>();
            return DapperHelper.GetModelList<SystemInfo>(sql);
        }
        public bool Add(SystemInfo t)
        {
            return BaseAdd(t);
        }

        public bool Delete(List<int> ids)
        {
            return BaseDelete(ids);
        }

        public SystemInfo Get(int id)
        {
            return BaseGet(id);
        }

        public List<SystemInfo> GetList(out int count, int page = 1, int per_page = 20)
        {
            return BaseGetList(out count, page, per_page);
        }

        public bool Update(SystemInfo t)
        {
            return BaseUpdate(t);
        }

        public int AddReturnAutoId(SystemInfo t)
        {
            return BaseAddReturnAutoId(t);
        }

    }
}
